home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / scherz programme / clicker / source / broker.h < prev    next >
C/C++ Source or Header  |  1996-04-07  |  1KB  |  39 lines

  1. /*  File:         broker.h
  2.  *  Created:      20-10-95
  3.  *  Updated:      30-10-95
  4.  *  Version:      1.0
  5.  *  Project:      Clicker
  6.  *  Owner:        Jeroen Vermeulen
  7.  *  Requirements: KickStart V39+
  8.  *  Legal:        PD
  9.  *  Status:       Release
  10.  */
  11.  
  12.  
  13. /* MakeBroker():
  14.  * Creates and initializes a NewBroker structure, including its MsgPort.
  15.  * Call KillBroker() to get rid of it later. If allocation fails for
  16.  * some reason, NULL is returned and the pointer indicated by errptr is
  17.  * redirected to an error string.
  18.  */
  19. struct NewBroker *MakeBroker(STRPTR *const errptr, const BYTE cx_pri);
  20.  
  21.  
  22. /* SetupBroker():
  23.  * Sets up the commodities broker network for Clicker (created with
  24.  * MakeBroker()) in an inactive state.  Activate or deactivate it with
  25.  * ActivateCxObj().
  26.  * If successful, a pointer to the root CxObj is returned, so it can later be
  27.  * deallocated with DeleteCxObjAll().  If an error occurs, NULL is returned and
  28.  * the STRPTR pointed to by errptr will point to an error message.
  29.  */
  30. CxObj *SetupBroker(STRPTR *const errptr, struct NewBroker *const mybroker);
  31.  
  32.  
  33. /* KillBroker():
  34.  * Delete a NewBroker structure (and its MsgPort) that was allocated
  35.  * through MakeBroker(). Calling this for an unitialized or NULL broker
  36.  * is safe, as long as initialization was done by MakeBroker().
  37.  */
  38. void KillBroker(struct NewBroker *const brokerobj);
  39.